<!DOCTYPE html>
<html>
    <head>
        <title></title>
        <meta charset="UTF-8">
        <link rel="stylesheet" type="text/css" href="<?php echo $this->url->getBaseUri() ?>public/back/Css/bootstrap.css" />
        <link rel="stylesheet" type="text/css" href="<?php echo $this->url->getBaseUri() ?>public/back/Css/bootstrap-responsive.css" />
        <link rel="stylesheet" type="text/css" href="<?php echo $this->url->getBaseUri() ?>public/back/Css/style.css" />
        <script type="text/javascript" src="<?php echo $this->url->getBaseUri() ?>public/back/Js/jquery.js"></script>
        <script type="text/javascript" src="<?php echo $this->url->getBaseUri() ?>public/back/Js/jquery.sorted.js"></script>
        <script type="text/javascript" src="<?php echo $this->url->getBaseUri() ?>public/back/Js/bootstrap.js"></script>
        <script type="text/javascript" src="<?php echo $this->url->getBaseUri() ?>public/back/Js/ckform.js"></script>
        <script type="text/javascript" src="<?php echo $this->url->getBaseUri() ?>public/back/Js/common.js"></script>
        <style type="text/css">
                body {
                    padding-bottom: 40px;
                }
                .sidebar-nav {
                    padding: 9px 0;
                }
                @media (max-width: 980px) {
                    /* Enable use of floated navbar text */
                    .navbar-text.pull-right {
                        float: none;
                        padding-left: 5px;
                        padding-right: 5px;
                    }
                }
        </style>
    </head>
    <body>
        <table class="table table-bordered table-hover definewidth m10" >
            <thead>
                <tr>
                    <th>用户</th>
                    <th>电话号码</th>
                    <th>剩余金额</th>
                    <th>操作</th>
                </tr>
            </thead>
            <?php foreach($result as $user) { ?>
            <tr>
                <td><?php echo $user->name ?></td>
                <td><?php echo $user->tel ?></td>
                <td><?php echo $user->money ?></td>
                <td>
                    <a href="<?php echo $this->url->getBaseUri() ?>admin/User/edit/<?php echo $user->id ?>">编辑</a>
                    <a href="<?php echo $this->url->getBaseUri() ?>admin/User/del/<?php echo $user->id ?>">删除</a>
                </td>
            </tr>
            <?php } ?>
        </table>
    </body>
</html>
<script>
    $(function () {
        
        $('#addnew').click(function(){
                window.location.href="add.html";
        });
    });
    function del(id)
    {
        
        
        if(confirm("确定要删除吗？"))
        {
        
            var url = "index.html";
            
                window.location.href=url;
        
        }
    
    
    
    
    }
</script>